GBML manual / Events

beyond_view

Runs every frame this instance’s position is outside the camera’s current 240x160 view - the exact rect, no margin (unlike default drawing’s own off-view sprite-release test, which pads it).

Syntax

beyond_view: fires every frame this instance is outside the camera’s view

Description

Runs every frame this instance's position is outside the camera's current 240x160 view - the exact rectangle, with no margin (default drawing's own off-view sprite-release test pads its own check slightly; this event does not). That release test, the Release off view setting, looks at the object's whole picture, not only at its position: a tall tree whose foot is below the screen stays drawn while any of its crown can be seen, and is let go only once its whole picture is off the screen. This event is about the position alone. Useful for anything that should react to leaving the player's sight specifically, rather than leaving the room, which Beyond Room already covers separately.

Example

visible = false;

Hides this instance's own sprite the moment it leaves the camera's view, independent of whether it is still inside the room.

See also: beyond_roomhit_room_edgeEvents